<template>
  <div class="admin-page">
    <el-container>
      <el-aside width="200px">
        <el-menu
          :router="true"
          :default-active="route.path"
          class="admin-menu"
        >
          <el-menu-item index="/admin/dashboard">
            <el-icon><DataLine /></el-icon>
            <span>数据概览</span>
          </el-menu-item>
          <el-menu-item index="/admin/scams">
            <el-icon><Document /></el-icon>
            <span>内容管理</span>
          </el-menu-item>
          <el-menu-item index="/admin/users">
            <el-icon><User /></el-icon>
            <span>用户管理</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script setup>
import { useRoute } from 'vue-router'
import { DataLine, Document, User } from '@element-plus/icons-vue'

const route = useRoute()
</script>

<style scoped>
.admin-page {
  min-height: calc(100vh - 72px);
  background-color: #f8f9fa;
}

.el-container {
  height: 100%;
}

.el-aside {
  background-color: white;
  border-right: 1px solid #edf2f7;
}

.admin-menu {
  height: 100%;
  border-right: none;
}

.el-main {
  padding: 20px;
  background-color: #f8f9fa;
}
</style> 